package com.ki.rent.mapper;

import com.ki.rent.entity.Booking;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.context.annotation.Bean;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author
 * @since 2020-06-06
 */
@Mapper
public interface BookingMapper extends BaseMapper<Booking> {

    @Select("select *from booking where house_id in (select house_id from house h where h.host_id = #{hostId} and h.house_still != 1)")
    List<Booking> selectHost(Integer hostId);
}
